using System.Collections.Generic;
using System.Globalization;
using System.Linq;

namespace Medianamik.Core.DAL.Services
{
    public class CultureService : ICultureService
    {
        public CultureInfo GetCurrentCulture()
        {
            return CultureInfo.CurrentUICulture;
        }

        public IList<Culture> All()
        {
            return ConfigManager.GetAllCultures().ToList();
        }

        public IList<Culture> AllButInvariant()
        {
            return All()
                .Where(c => c.CultureName != string.Empty)
                .ToList();
        }
    }
}